package com.weng.platform.platform.model.vo;

import com.weng.framework.common.model.component.tree.TreeNode;
import com.weng.framework.common.model.component.tree.TreeNodeConverter;
import com.weng.platform.platform.entity.Column;

import java.util.Date;

/**
 * 栏目树列表
 * @author wengzhonghui
 */
public class ColumnTreeNode extends TreeNode implements TreeNodeConverter<Column, ColumnTreeNode> {

	private String id;
    private String name;
    private String code;
    private Double position;
    private String sourcesName;
    private String remark;

    private Date updateTime;
   	
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getSourcesName() {
        return sourcesName;
    }

    public void setSourcesName(String sourcesName) {
        this.sourcesName = sourcesName;
    }

    public Double getPosition() {
        return position;
    }

    public void setPosition(Double position) {
        this.position = position;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

   


	public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public ColumnTreeNode convert(Column t) {
        ColumnTreeNode node = new ColumnTreeNode();
        // tree node
        node.setKey(t.getId());
        node.setLabel(t.getName());
        node.setParentId(t.getParentId());

        // property
        node.setId(t.getId());
        node.setName(t.getName());
        node.setCode(t.getCode());
        node.setRemark(t.getRemark());
        node.setPosition(t.getPosition());
        node.setUpdateTime(t.getUpdateTime());
        return node;
    }
}
